const { BaseAction , RequestParser , RequestAuth } = require("breeze-web") 
const MongoAction = new BaseAction("mongo")
const ParamOption = RequestParser.ParamOption

MongoAction.get({
    path : "/add" ,
    params : [
        ParamOption.String("name" , "姓名" , 1 , 20 ) ,
    ]
} , async ctx => {
    const Mongo = ctx.Kit.mongo 
    const Hello = Mongo.model("Hello")

    const entity = await new Hello({
        name : "测试一下"
    }).save()

    ctx.body = entity

})

module.exports = MongoAction 